<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="keywords" content="table">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="__PUBLIC__/assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="__PUBLIC__/assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="__PUBLIC__/assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="__PUBLIC__/assets/css/admin.css">
   <title>订单列表</title>
  <style>
  	input[readonly]{
  		background-color:#fff;
  	}
  </style>
</head>
<body style="overflow:scroll">
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->
 <!-- <div class="am-dropdown" data-am-dropdown>
  <button class="am-btn am-btn-primary am-dropdown-toggle" data-am-dropdown-toggle>搬家类型 <span class="am-icon-caret-down"></span></button>
  <ul class="am-dropdown-content">
    <li class="am-dropdown-header">标题</li>
    <li><a href="__MODULE__/order/index">小型搬家</a></li>
    <li><a href="__MODULE__/pro/index">专业搬家</a></li>
    <li><a href="#"</a></li>
  </ul>
 </div> -->
 
 <table class="am-table am-table-striped am-text-nowrap">
  <thead>
  <tr>
    <th>订单号</th>
    <th class="am-hide-sm-only">出发地</th>
    <th class="am-hide-sm-only">目的地</th>
    <th class="am-hide-sm-only">是否搬运</th>
   <th>状态</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <volist name="order" id="vo">
    <!-- <tr onclick="showcarry('{$vo.orderno}')"> -->
	 <tr >
	  	<td>{$vo.orderno}</td>
      <td class="am-hide-sm-only">{$vo.startadd}</td>
      <td class="am-hide-sm-only">{$vo.endadd}</td>
      <td class="am-hide-sm-only">{$vo.is_carry}</td>
	    <td><if condition="$vo.status eq 0">待处理
            <elseif condition="$vo.status eq 1"/>未完成
            <elseif condition="$vo.status eq 2"/>已处理
            <else />
            已取消
            </if></td>
	    <td>
      <button onclick="showcarry('{$vo.orderno}')" class="am-btn am-btn-success am-btn-xs " id="doc-confirm-toggle"><span class="am-icon-adjust"></span>查看订单</button>
      <if condition="$vo.status eq 0"> <button onclick="quxiao('{$vo.orderno}')" class="am-btn am-btn-default am-btn-xs am-text-danger" id="doc-confirm-toggle"><span class="am-icon-trash-o"></span>取消订单</button>
      <elseif condition="$vo.status eq 1"/>未完成
      <elseif condition="$vo.status eq 2"/>已处理
      <else />
      已取消
      </if>
     </td>
	  </tr>
  </volist> 
  </tbody>
</table>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="__PUBLIC__/assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
    <script src="__PUBLIC__/js/jquery.min.js?t=20141028987051"></script>
<!--<![endif]-->
<script src="__PUBLIC__/assets/js/amazeui.min.js"></script>
<script src="__PUBLIC__/assets/js/app.js"></script>
<script>
  function showcarry(id) {
    window.location.href="__CONTROLLER__/showcarry/orderno/"+id;

  }

  function quxiao(orderno) {
   if(confirm('确实要取消订单吗?')){

      var url='__CONTROLLER__/delOrder';
       $.post( url, {
        orderno:orderno,
        }, function(data) {
          if (data=='1') {
            alert('取消成功');
          }else{
            alert('取消失败');
          }
           location.reload()
        });

   }
   
  }
</script>
 
</body>
</html>
